AC_INIT([testing], [0.1])

if test -d "$*" ; then
    AC_MSG_CHECKING([for target system])

    cpu=`uname -m`
    target_os=$cpu-`uname`
    case "$target_os" in
    *-Linux)
        target_os="$cpu-unknown-linux-gnu"
        ;;
    esac

    AC_MSG_RESULT([$target_os])

    pre=`dirname $0`
    . $pre/preconfig.sh
    cd $*
    exec ./configure
    exit 1
fi

AC_CONFIG_AUX_DIR([autoconf])
AC_CONFIG_HEADERS(config.h)
AC_CANONICAL_SYSTEM

pre=`dirname $0`
. $pre/preconfig.sh

AM_INIT_AUTOMAKE
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_CONFIG_SUBDIRS([ucommon osip2 exosip2 srtp ortp sipwitch ccaudio2 bayonne apennine ccrtp])
AC_OUTPUT
